package cn.xtits.xtf.common.spring.db;


public class DynamicDataSourceShardHolder {
    /**
     * 数据源
     */
    private static final ThreadLocal<Shard> shardThreadLocal = new ThreadLocal<Shard>();

    public static Shard getShard() {
        return shardThreadLocal.get();
    }

    public static void setDataSource(Shard shard) {
        shardThreadLocal.set(shard);
    }

    public static void clear() {
        shardThreadLocal.remove();;
    }





}
